package com.guigu.Curriculum.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.guigu.Curriculum.enums.CourseStatusEnum;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 课程
 * </p>
 *
 * @author liulinjun
 * @since 2020-07-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ab_course")
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class AbCourse implements Serializable {

    private static final long serialVersionUID=1L;

      /**
     * 课程ID
     */
      @TableId(value = "course_id",type = IdType.ASSIGN_ID)
        private Long courseId;

      /**
     * 课程类别ID
     */
      private Long courseSubjectId;

      /**
     * 课程标题
     */
      @TableField(value = "course_title")
      private String courseTitle;

      /**
     * 课程封面图片路径
     */
      private String courseCover;

      /**
     * 总课时
     */
      private Integer courseLessonNum;

      /**
     * 课程讲师ID
     */
      private Long courseTeacherId;

      /**
     * 课程销售价格，设置为0则可免费观看
     */
      private BigDecimal coursePrice;

      /**
     * 浏览数量
     */
      private Long courseViewCount;

      /**
     * 销售数量
     */
      private Long courseBuyCount;

      /**
     * 课程状态 Draft未发布  Normal已发布
     */
      private CourseStatusEnum courseStatus;

      /**
     * 逻辑删除 1（true）已删除， 0（false）未删除
     */
      @TableLogic
      private Integer courseIsDeleted;

      /**
     * 排序id
     */
      private Long courseSort;

      /**
     * 创建时间
     */
      @TableField(value = "course_gmt_create",fill = FieldFill.INSERT)

      private LocalDateTime courseGmtCreate;

      /**
     * 更新时间
     */
      @TableField(value = "course_gmt_modified",fill = FieldFill.INSERT_UPDATE)
      private LocalDateTime courseGmtModified;

      private String courseRichText;
}
